package com.bw.demo.home

import androidx.lifecycle.MutableLiveData
import com.bw.demo.base.BaseViewModel
import com.bw.demo.entity.BaseTypeRepo
import com.bw.demo.entity.BaseVideoRepo
import com.bw.demo.entity.TypeEntity
import com.bw.demo.entity.VideoEntity

class HomeViewModel : BaseViewModel(){
    private val repo = HomeRepo()
    val success =MutableLiveData<BaseVideoRepo<List<VideoEntity>>>()
    val failure =MutableLiveData<String>()

    val success2 =MutableLiveData<BaseTypeRepo<List<TypeEntity>>>()
    val failure2 =MutableLiveData<String>()
    fun getVideo(channelId: String,page: Int,pagesize: Int){
        repo.getVideo(channelId, page, pagesize, success, failure)
    }

    fun getType(videotype:Int,getSimpleType:Int){
        repo.getType(videotype,getSimpleType,success2,failure2)
    }
}